package com.eastfair.home.service;

import com.eastfair.venueservice.dto.ExhibitionServiceProviderQuery;
import com.eastfair.venueservice.dto.ServiceProviderDTO;
import com.eastfair.venueservice.vo.ServiceProviderVO;

import java.util.List;
import java.util.Map;

public interface HomeServiceProviderService {

    /**
     * 查询主场服务商信息
     * @param userId
     * @return
     */
    ServiceProviderVO getHomeServiceProviderByUserId(Long userId);

    /**
     * id查询服务商详情.
     *
     * @param id the id
     * @return the by id
     */
    ServiceProviderVO getById(Long id);

    /**
     * 保存主场服务商信息
     * @param serviceProviderDTO
     * @return
     */
    Boolean saveHomeServiceProvider(ServiceProviderDTO serviceProviderDTO);

    /**
     * 修改主场服务商信息
     * @param serviceProviderDTO
     * @return
     */
    Boolean updateHomeServiceProvider(ServiceProviderDTO serviceProviderDTO);

    /**
     * 查询展会下的服务商.
     *
     * @param query the query
     * @return the list
     */
    List<ServiceProviderVO> queryExhibitionServiceProvider(ExhibitionServiceProviderQuery query);

    /**
     * 展会ID获取负责展馆的服务商.
     *
     * @param exhibitionId        the exhibition id
     * @param spaceCode           the space code
     * @param serviceProviderType the service provider type
     * @return the list
     */
    List<ServiceProviderVO> listServiceProvidersByExhibitionId(Long exhibitionId, List<String> spaceCode, String serviceProviderType);

    /**
     * 展会ID获取负责展馆的服务商.
     *
     * @param exhibitionId        the exhibition id
     * @param spaceCode           the space code
     * @param serviceProviderType the service provider type
     * @return map key-spaceCode, value-List<ServiceProviderVO>
     */
    Map<String, List<ServiceProviderVO>> getServiceProviderVOMapByExhibitionId(Long exhibitionId, List<String> spaceCode, String serviceProviderType);

    /**
     * 展会ID和展厅编码查询负责的主场.
     *
     * @param exhibitionId the exhibition id
     * @param spaceCode    the space code
     * @return the home by exhibition and space code
     */
    ServiceProviderVO getHomeByExhibitionIdAndSpaceCode(Long exhibitionId, String spaceCode);
}
